﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="errors_list.aspx.cs" Inherits="RastinArgham.CRM.Web.errors_list" %>
<%@ Import Namespace="Mani.Common" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h3 class="ui-widget-header">
            <asp:Literal ID="lbtitle" runat="server" Text="لیست خطاهای نرم افزار" />
    </h3>

    <div class="ui-layout-content ui-widget-content">
        
        نام کاربر
        &nbsp;&nbsp;
        <asp:TextBox ID="txtUsername" runat="server" />
        &nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btnSearch" runat="server" Text="جستجو" 
            onclick="btnSearch_Click" />


        <div class="space"></div>

        <mani:PagingGridView runat="server" ID="gvErrors" AllowPaging="true" PageSize="15"
            AutoGenerateColumns="false" GridLines="none" DataKeyNames="Id" 
            onpageindexchanging="gvErrors_PageIndexChanging" 
            onselectedindexchanging="gvErrors_SelectedIndexChanging">
            
            <Columns>
                
                <asp:TemplateField HeaderText="تاریخ">
                    <ItemTemplate>
                        <%# Convert.ToDateTime(Eval("CreateDate")).ToJalaliWithTime().Split(' ')[0] %>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText="زمان">
                    <ItemTemplate>
                        <%# Convert.ToDateTime(Eval("CreateDate")).ToJalaliWithTime().Split(' ')[1] %>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:BoundField HeaderText="کاربر" DataField="Username" />
                <asp:BoundField HeaderText="صفحه" DataField="ErrorPath" />
                <asp:BoundField HeaderText="عنوان خطا" DataField="ExceptionMessage" />

                <asp:TemplateField HeaderText="جزییات خطا">
                    <ItemTemplate>
                      <asp:LinkButton CommandName="Select" runat="server" Text="..."></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>

            </Columns>

        </mani:PagingGridView>

        <div class="space2"></div>

        <div id="divDetails" runat="server">
            <h4>جزییات خطا: </h4>

            مشخصات سیستم کاربر :
            <asp:Label ID="lblUserAgent" runat="server" />

            <div class="space"></div>    

            شرح کامل خطا : 
            <br />

            <div style="direction:ltr; text-align:left;width:95%;overflow:auto">
               <pre><asp:Label ID="lblExceptionDetail" runat="server" /></pre>
            </div>
        </div>
    </div>
</asp:Content>
